<?php /* Smarty version 2.6.18, created on 2016-12-14 18:05:42
         compiled from staff/staff.subjectadd.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
         <form action="" method="POST">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;" ></span>
                    <p class="box-title">科任指派设置</p>
                </div>
                    <div class="box-body">
                         <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       教师姓名：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
									   <input name="q" id="staff_name" type="text" class="form-control" value="<?php echo $this->_tpl_vars['staff_data']['staff_name']; ?>
" autocomplete="off" >
									   <input name="staff_id" id="staff_id" type="hidden" class="form-control" value="">
                                  </div> 
				          </div>
                           <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       班级名称：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
								  <?php $_from = $this->_tpl_vars['class_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                       <label class="choice"><input type="checkbox" name="class_ids[]" value="<?php echo $this->_tpl_vars['value']['class_id']; ?>
" <?php if ($this->_tpl_vars['value']['is_check'] == '1'): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['value']['class_name']; ?>
</label>
								  <?php endforeach; endif; unset($_from); ?>
                                                                      
                                  </div> 
				            </div>
                            <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       学科名称：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
								  <?php $_from = $this->_tpl_vars['subject_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                       <label class="choice"><input type="checkbox" name="subject_ids[]" value="<?php echo $this->_tpl_vars['value']['subject_id']; ?>
" <?php if ($this->_tpl_vars['value']['is_check'] == '1'): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['value']['subject_name']; ?>
</label>
                                  <?php endforeach; endif; unset($_from); ?>                            
                                  </div> 
				            </div>
                            <div class="form-group">
                                  <label for="inputPassword3" class="col-md-3 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
                                       周总课时：
                                  </label>
                                  <div class="input-group col-md-6 col-sm-12 col-xs-12">
                                       <input type="number" class="form-control" name="week_hour" value="<?php echo $this->_tpl_vars['week_hour']; ?>
">
                                  </div> 
				             </div>   
				    </div><!--box-body -->
                    <div class="box-footer text-center">
				      <button type="submit" class="btn btn-primary"> 确 定 </button>					  
				   </div>
                 </form>
             </div><!--box box-default box-solid-->
         </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script src="static/js/run_prettify.js"></script>
<script src="static/js/jquery.mockjax.js"></script>
<script src="static/js/bootstrap-typeahead.js"></script>
 <script>
		$(function() {
			function displayResult(item) {
				$("#staff_id").val(item.value);
				if(item.value > 0){
				//window.location.href="index.php?a=staff.subjectupdate&staff_id="+item.value;
				}
			}
			$('#staff_name').typeahead({
			 source: [
			<?php $_from = $this->_tpl_vars['staff_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
            { id: <?php echo $this->_tpl_vars['value']['staff_id']; ?>
, name: '<?php echo $this->_tpl_vars['value']['staff_name']; ?>
' },
			<?php endforeach; endif; unset($_from); ?>
        ],

				onSelect: displayResult,
			});
		  
		});
	</script>